package com.ykdl.member.kid.beans;

import java.io.Serializable;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;

import net.wxxr.http.interfaces.IJsonParser;

public class BodyTypeBean implements Serializable, IJsonParser {

	/**
	 * "actor_id": 6143,
       "create_time": 1395042475.17418,
       "id": 108,
       "record_time": 1395042475.174145,
       "type": 2,
       "value": 50
	 */
	
	public static final int TYPE_HEIGHT = 1; //身高
	public static final int TYPE_WEIGHT = 2; //体重
	public static final int TYPE_HEAD = 3; //头围
	
	
	private static final long serialVersionUID = 503618356148219070L;
	private long actor_id; // 用户id
	private float create_time; // 创建时间
	private int id; // 数据id
	private float record_time;
	private int type; // 数据类型   1代表身高，2代表体重，3代表头围
	private float value; // 数据值
	
	public long getActor_id() {
		return actor_id;
	}

	public void setActor_id(long actor_id) {
		this.actor_id = actor_id;
	}

	public float getCreate_time() {
		return create_time;
	}

	public void setCreate_time(float create_time) {
		this.create_time = create_time;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public float getRecord_time() {
		return record_time;
	}

	public void setRecord_time(float record_time) {
		this.record_time = record_time;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public float getValue() {
		return value;
	}

	public void setValue(float value) {
		this.value = value;
	}

	@Override
	public IJsonParser parse(String json) throws Exception {
		Gson gson = null;
		if (null != json) {
			GsonBuilder b = new GsonBuilder();
			gson = b.create();
			return gson.fromJson(json, BodyTypeBean.class);
		}
		return null;
	}

}
